Two-sided context specifications in formal grammars
نویسندگان
چکیده
In a recent paper (M. Barash, A. Okhotin, “An extension of context-free grammars with one-sided context specifications”, Inform. Comput., 2014), the authors introduced an extension of the context-free grammars equipped with an operator for referring to the left context of the substring being defined. This paper proposes a more general model, in which context specifications may be two-sided, that is, both the left and the right contexts can be specified by the corresponding operators. The paper gives the definitions, presents several examples of grammars and establishes a basic normal form theorem. This normal form, in particular, leads to a simple parsing algorithm working in time O(n), where n is the length of the input string.
منابع مشابه
Improved Normal Form for Grammars with One-Sided Contexts
Formal grammars equipped with operators for specifying the form of the context of a substring were recently studied by Barash and Okhotin (“An extension of context-free grammars with one-sided context specifications”, Inform. Comput., 2014), further extending the author’s earlier work on propositional connectives in grammars (A. Okhotin, “Conjunctive grammars”, J. Autom. Lang. Comb., 2001). The...
متن کاملGrammars with two-sided contexts
In a recent paper (M. Barash, A. Okhotin, “Defining contexts in context-free grammars”, LATA 2012), the authors introduced an extension of the context-free grammars equipped with an operator for referring to the left context of the substring being defined. This paper proposes a more general model, in which context specifications may be two-sided, that is, both the left and the right contexts ca...
متن کاملFormal specification of the user interface by using parametric context-free grammars∗
Despite the significant progress and the emergence of proficient tools that have been witnessed recently, the development of user interfaces remains a hard task in the software development process. The use of formal methods for the specification of user interfaces has been proposed as an aid in this task and various formal models have been considered. Grammars were one of the earliest models th...
متن کاملAn extension of context-free grammars with one-sided context specifications
The paper introduces an extension of context-free grammars equipped with a quantifier for referring to the left context, in which the substring being defined does occur. For example, a rule A→ a& B defines a string a, as long as it is preceded by any string defined by B. The conjunction operator in this example is taken from conjunctive grammars (Okhotin, 2001), which are an extension of the st...
متن کاملGeneralized LR Parsing for Grammars with Contexts
The Generalized LR parsing algorithm for context-free grammars is notable for having a decent worst-case running time (cubic in the length of the input string), as well as much better performance on “good” grammars. This paper extends the Generalized LR algorithm to the case of “grammars with left contexts” (M. Barash, A. Okhotin, “An extension of context-free grammars with one-sided context sp...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Theor. Comput. Sci.
دوره 591 شماره
صفحات -
تاریخ انتشار 2015